<div id="jm-left" class="" >
    <div class="jm-module " id="">
       <div class="jm-module-content">
          <h3 class="jm-title">海洋クラブ情報</h3>
          <h2 class="title_h2">◆検索</h2>
          <div class="content-message">
            <table width="200" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                    <td width="30" height="24" align="right" nowrap="">■&nbsp;</td>
                    <td width="170">都道府県を選択</td>
                    </tr>
                    <tr>
                    <td></td>
                    <td>
                        <select name="pref" id="pref">
                                <option value='0'>指定しない</option>    
                                <?php 
                                    foreach($this->getModel()->getPREF() as $area){
                                        $selected = JRequest::getVar('pref') == $area->PREF_CODE ? 'selected' : '';
                                        echo "<option $selected value='$area->PREF_CODE'>$area->PREF_NAME</option>";
                                    }
                                 ?>    
                        </select>
                    </td>
                    </tr>
                    <tr>
                    <td height="15" colspan="2"></td>
                    </tr>
                    <tr>
                    <td height="24" align="right" nowrap="">■&nbsp;</td>
                    <td>クラブ名：コードを入力</td>
                    </tr>
                    <tr>
                    <td></td>
                    <td><input name="centerName" id="centerName" type="text" size="16" value="<?php echo JRequest::getVar('centerName'); ?>"/></td>
                    </tr>
                    
                    <tr>
                    <td height="24" align="right" nowrap="">■&nbsp;</td>
                    <td>クラブ種別を選択</td>
                    </tr>
                    <tr>
                    <td></td>
                    <td>
                        <select name="club" id="club">
                                <option value='0'>指定しない</option>    
                                <?php 
                                    foreach($this->getModel()->getCLUB() as $club){
                                        $selected = JRequest::getVar('club') == $club->CLUB_CODE ? 'selected' : '';
                                        echo "<option $selected value='$club->CLUB_CODE'>$club->CLUB_NAME</option>";
                                    }
                                 ?>    
                        </select>
                    </td>
                    </tr>
                    <tr>
                    <td height="15" colspan="2"></td>
                    </tr>
                    
                    <tr>
                    <td></td>
                    <td align="center">
                    <!-- <button id="search" type="button" onclick="Joomla.submitbutton('search')">検索</button>-->
                    <button id="search" name="btnsearch" type="button" onclick="Joomla.submitbutton('search')">検索</button>
                    <input type="button" id="print_clubs" style="cursor:pointer;" name="CenterPrint" value="&nbsp;印刷画面&nbsp;" />
                    </td>
                    </tr>
                    </tbody></table>
            <input type="hidden" name="task" value=""/>
            <input type="hidden" name="boxchecked" value="0"/>
            <input type="hidden" name="check" value="1"/>
          </div>
          <div class="clearfix"></div>
          
       </div>
    </div>
    
 </div>
 <script>
  jq(document).ready(function(){
     jq('#print_clubs').click(function(){
         window.open('index.php?top=page&option=com_frclub&task=print' +
                 '&pref=' + jq('#pref').val() +
                 '&centerName=' + encodeURI(jq('#centerName').val()) +
                 '&club=' + jq('#club').val()
             ,'_blank'
         );
     });
 });
  jq('#pref').css("width","173px");
 jq('#centerName').css("width","173px");
 jq('#club').css("width","173px");
 </script>